package datatypes.r2.basic.impl;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import datatypes.r2.basic.CS;
import datatypes.r2.flavors.ST_SIMPLE;
import datatypes.r2.flavors.impl.CodedValue;
import datatypes.r2.flavors.impl.StringNoTranslations;
import datatypes.r2.flavors.impl.StringSimple;
import datatypes.r2.flavors.impl.TextWithReference;


@javax.persistence.Entity
public class CodedSimpleValue extends CodedValue implements CS{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private long id;
	
	@ManyToOne
	@JoinColumn(name="code_id")
	private StringSimple code;
	@ManyToOne
	@JoinColumn(name="codeSystem_id")
	private UniqueIdentifierString codeSystem;
	@ManyToOne
	@JoinColumn(name="codeSystemName_id")
	private StringNoTranslations codeSystemName;
	@ManyToOne
	@JoinColumn(name="codeSystemVersion_id")
	private StringSimple codeSystemVersion;
	@ManyToOne
	@JoinColumn(name="displayName_id")
	private CharacterString displayName;
	@ManyToOne
	@JoinColumn(name="originalText_id")
	private TextWithReference originalText;
	
	@Override
	public ST_SIMPLE literal() {
		// TODO Auto-generated method stub
		return null;
	}

	public StringSimple getCode() {
		return code;
	}

	public void setCode(StringSimple code) {
		this.code = code;
	}

	public UniqueIdentifierString getCodeSystem() {
		return codeSystem;
	}

	public void setCodeSystem(UniqueIdentifierString codeSystem) {
		this.codeSystem = codeSystem;
	}

	public StringNoTranslations getCodeSystemName() {
		return codeSystemName;
	}

	public void setCodeSystemName(StringNoTranslations codeSystemName) {
		this.codeSystemName = codeSystemName;
	}

	public StringSimple getCodeSystemVersion() {
		return codeSystemVersion;
	}

	public void setCodeSystemVersion(StringSimple codeSystemVersion) {
		this.codeSystemVersion = codeSystemVersion;
	}

	public CharacterString getDisplayName() {
		return displayName;
	}

	public void setDisplayName(CharacterString displayName) {
		this.displayName = displayName;
	}

	public TextWithReference getOriginalText() {
		return originalText;
	}

	public void setOriginalText(TextWithReference originalText) {
		this.originalText = originalText;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}
	
	
	
	
}
